﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations.Schema;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Abp;
using Abp.Domain.Entities;
using Abp.Domain.Entities.Auditing;

namespace Lays.Manage.Core.News
{
    public class News : FullAuditedEntity
    {
        /// <summary>
        /// 标题
        /// </summary>
        public string Title { get; set; }
        /// <summary>
        /// 内容
        /// </summary>
        public string Content { get; set; }
        /// <summary>
        /// 作者
        /// </summary>
        public string  Author{ get; set; }
        /// <summary>
        /// 发布时间
        /// </summary>
        public DateTime? PublishedTime  { get; set; }
        /// <summary>
        /// 点击率
        /// </summary>
        public int ClickCount { get; set; }
        /// <summary>
        /// 是否置顶
        /// </summary>
        public bool IsTop { get; set; }

        public bool IsPicture { get; set; }

        public int CommentCount { get; set; }
        
        public virtual ICollection<Comments> Comments { get; set; }

        public int NewsTypeId { get; set; }
        [ForeignKey("NewsTypeId")]
        public virtual NewsType NewsType { get; set; }


    }
    
}
